//
// Created by wjc13 on 2017/8/6.
//

#ifndef SQLIST_EXTSQLIST_H
#define SQLIST_EXTSQLIST_H

#include <stdio.h>
#include <stdlib.h>

#ifdef SQLIST_EXTSQLIST_H
#define INIT_SIZE 10
#define ADD_SIZE 10

#define True 1
#define False 0
//无法再分配内存
#define OVERFLOW -2
#endif

typedef int Status;
typedef int ElemType;

struct SqList {
    ElemType *data;
    int length;
    int currentMaxLength;
};

Status InitList(struct SqList *L);

int ListLength(struct SqList L);

Status EmptyList(struct SqList *L);

Status InsertElem(struct SqList *L, int location, ElemType elem);

Status DeleteElem(struct SqList*, int, ElemType*);

Status GetElem(struct SqList L, int location,ElemType* elem);

int LocateElem(struct SqList L, ElemType elem);

Status IsListEmpty(struct SqList L);

#endif //SQLIST_EXTSQLIST_H
